From: Richard M. Stallman Date: Thu, 5 Sep 2002 02:36:22 +0000 (+0000) Subject: (displayed_window_lines): Correct for one-off bug X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~30820 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=365bbb215e518b838d232f7b5f738b1cf237df59;p=emacs.git (displayed_window_lines): Correct for one-off bug in HEIGHT on non-window displays. --- diff --git a/src/window.c b/src/window.c index 616afd6bc51..c629a30cb7d 100644 --- a/src/window.c +++ b/src/window.c @@ -4653,6 +4653,15 @@ displayed_window_lines (w) move_it_vertically (&it, height); bottom_y = line_bottom_y (&it); + /* rms: On a non-window display, + the value of it.vpos at the bottom of the screen + seems to be 1 larger than window_box_height (w). + This kludge fixes a bug whereby (move-to-window-line -1) + when ZV is on the last screen line + moves to the previous screen line instead of the last one. */ + if (! FRAME_WINDOW_P (XFRAME (w->frame))) + height++; + /* Add in empty lines at the bottom of the window. */ if (bottom_y < height) {